package com.example.libcommen

import android.widget.Toast

/**
 *  toast工具类
 */
fun Int.toast(duration: Int = Toast.LENGTH_SHORT) {
    Toast.makeText(AppGlobals.application, this, duration).show()
}

// 指认默认参数 duration （duration: Int = Toast.LENGTH_SHORT）
fun String.toast(duration: Int = Toast.LENGTH_SHORT) {
    Toast.makeText(AppGlobals.application, this, duration).show()
}
